// https://vuex.vuejs.org/zh-cn/intro.html
// make sure to call Vue.use(Vuex) if using a module system
import Vue from 'vue'
import Vuex from 'vuex'
import listData from './list-data'
import movieslist from './moviesList'
Vue.use(Vuex)

const store = new Vuex.Store({
  state: {
		listArray:{},
		moviesList:{}
  },
  mutations: {
		getList(state,value){
			state.listArray=value
		},
		getmoviesList(state,value){
			state.moviesList=value
		}
  },
	actions:{
		getList(){
			this.commit('getList',listData)
		},
		getmoviesList(){
			this.commit('getmoviesList',movieslist)
		}
	}
})

export default store
